package cn.wolfcode.service;

import cn.wolfcode.domain.OperateIntergralVo;
import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.BusinessActionContextParameter;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;

@LocalTCC
public interface IUsableIntegralService {
    Boolean payOnIntergral(OperateIntergralVo intergralVo);
    
    
    //Boolean refundOnintergral(OperateIntergralVo intergralVo);
    
    
    @TwoPhaseBusinessAction(name = "refundTry", commitMethod = "refundOnintergralCommit", rollbackMethod = "refundOnintergralCancel")
    Boolean refundTry(BusinessActionContext context,
            @BusinessActionContextParameter(paramName = "operateIntergralVo")
                                   OperateIntergralVo operateIntergralVo);
 
    Boolean refundOnintergralCommit(BusinessActionContext context);
   
    Boolean refundOnintergralCancel(BusinessActionContext context);
}
